<?php

namespace Database\Seeders;

use App\Models\Category;
use Illuminate\Database\Seeder;

class CategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // TODO 别的分类
        $categories = [
            ['name' => '语文', 'flag' => 'yuwen', 'category_group_id' => 1 ,'user_id' => 1],
            ['name' => '数学', 'flag' => 'shuxue', 'category_group_id' => 1 ,'user_id' => 1],
            ['name' => '英语', 'flag' => 'yingyu', 'category_group_id' => 1 ,'user_id' => 1],
            ['name' => '期中考试', 'flag' => 'qizhongkaoshi', 'category_group_id' => 2 ,'user_id' => 1],
            ['name' => '期末考试', 'flag' => 'qimokaoshi', 'category_group_id' => 2 ,'user_id' => 1],
            ['name' => '周考', 'flag' => 'zhoukao', 'category_group_id' => 2 ,'user_id' => 1],
            ['name' => '月考', 'flag' => 'yuekao', 'category_group_id' => 2 ,'user_id' => 1],
            ['name' => '一年级', 'flag' => 'yinianji', 'category_group_id' => 3 ,'user_id' => 1],
            ['name' => '二年级', 'flag' => 'ernianji', 'category_group_id' => 3 ,'user_id' => 1],
            ['name' => '三年级', 'flag' => 'sannianji', 'category_group_id' => 3 ,'user_id' => 1],
            ['name' => 'HTML', 'flag' => 'HTML', 'category_group_id' => 4 ,'user_id' => 1],
            ['name' => 'HTML5', 'flag' => 'HTML5', 'category_group_id' => 4 ,'user_id' => 1, 'pid' => 11],
            ['name' => 'JavaScript', 'flag' => 'JavaScript', 'category_group_id' => 4 ,'user_id' => 1],
            ['name' => 'ES6', 'flag' => 'es6', 'category_group_id' => 4 ,'user_id' => 1, 'pid' => 13],
            ['name' => 'Vue', 'flag' => 'Vue', 'category_group_id' => 4 ,'user_id' => 1],
            ['name' => 'React', 'flag' => 'React', 'category_group_id' => 4 ,'user_id' => 1],
            ['name' => '我的考试', 'flag' => 'wodekaoshi', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '我的练习', 'flag' => 'wodelianxi', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '我的成绩', 'flag' => 'wodechengji', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '自主练习', 'flag' => 'zizhulianxi', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '我的闯关', 'flag' => 'wodechuangguan', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '错题重做', 'flag' => 'cuotichongzuo', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '我的积分', 'flag' => 'wodejifen', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '我的排行', 'flag' => 'wodepaihang', 'category_group_id' => 5 ,'user_id' => 1],
            ['name' => '技术帮助', 'flag' => 'jishubangzhu', 'category_group_id' => 5 ,'user_id' => 1],

        ];

        foreach ($categories as $category) {
            Category::create($category);
        }
    }
}
